﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

using RpgLibrary;
using RpgLibrary.SpriteClasses;
using XRpgLibrary.TileEngine;

namespace XRpgLibrary.SpriteClasses
{
    public class AnimatedSpriteData : IRpgDataObject
    {

        #region Field Region

        public Dictionary<AnimationKey, AnimationData> Animations;
        public AnimationKey CurrentAnimation;
        public bool IsAnimating;
        public string TextureImageName;
        public Vector2 Position;
        public Vector2 Velocity;
        public float Speed = 200.0f;
        
        #endregion
        
        #region Property Region

        public string Name
        {
            get
            {
                return "AnimatedSprite";
            }
            set
            {

            }
        }

        #endregion
        
        #region Constructor Region


        public AnimatedSpriteData(
            Dictionary<AnimationKey, AnimationData> animations, 
            string textureImageName, 
            Vector2 position, 
            Vector2 velocity, 
            float speed)
        {
            Animations = animations;
            TextureImageName = textureImageName;
            Position = position;
            Velocity = velocity;
            Speed = speed;
        }

        public AnimatedSpriteData()
        {
            Animations = new Dictionary<AnimationKey, AnimationData>();
        }
        
        #endregion
        
        #region Method Region

        public override string ToString()
        {
            return Name;
        }

        #endregion

       
    }
}
